<?php
$_doc = array();
$_doc['title'] = L('tab_user_list');
L(include(LANG_PATH.LANG_SET.'/pRole.php'));
?>
<include file="pAdmin:header" />
<table class="tabmenu" cellspacing="0">
    <tbody>
        <tr>
            <td class="wedge">&nbsp;</td>
            <td class="wmenu here"><a href="__URL__/index">{%tab_user_list}</a></td>
            <td class="wmenu"><a href="__URL__/add"><span>{%tab_user_add}</span></a></td>
            <td class="wmenu"><a href="__APP__/pRole/index"><span>{%tab_role_list}</span></a></td>
            <td class="wmenu"><a href="__APP__/pRole/add"><span>{%tab_role_add}</span></a></td>
            <td>&nbsp;</td>
        </tr>
    </tbody>
</table>
<div class="main">
    <?php
    if(array_key_exists('q',$_GET)){
    ?>
    <div class="findResult">
        <b>{%search_result}</b>({%search_key}<b class="keyword">{.q}</b>)
    </div>
    <script type="text/javascript">
        highlight('{.q}',{selector:'#gridInst .grid'});
    </script>
    <?php
    }
    ?>
    <ul class="fnc">
        <li class="page">{$page}</li>
        <li><button type="button" class="btn" onclick="act('edit');">{%action_alter}</button></li>
        <li><button type="button" class="btn" onclick="act('removal');">{%action_removal}</button></li>
    </ul>
    <form name="mainForm" method="get" action="__URL__">
        <input type="hidden" name="a">
        <table class="data" id="gridInst">
            <thead>
                <tr>
                    <th class="cbCell roundedleft"><input type="checkbox" id="effectAll" /></th>
                    <th>{%column_username}</th>
                    <th>{%column_realname}</th>
                    <th>{%column_role}</th>
                    <th>{%column_mail}</th>
                    <th>{%column_lastlogin}</th>
                    <th class="roundedright">{%column_createtime}</th>
                </tr>
            </thead>
            <?php
            $_status=array('<label>['.L('status_disabled').']</label>','');
            ?>
            <tbody class="grid">
                <present name="list">
                    <iterate name="list" id="vo">
                        <tr id="row{$vo['id']}" class="<?php if ($vo['status']=='0'):echo 'disabled';endif;?>">
                            <td><input type="checkbox" name="id[]" value="{$vo['id']}"/></td>
                            <td><?php echo $_status[$vo['status']]; ?>{$vo['account']}</td>
                            <td>{$vo['realname']}</td>
                            <td><a href="__ACTION__&role={$vo['role']}">{$vo['rolename']}</a></td>
                            <td>{$vo['email']}</td>
                            <td>{$vo['loginip']}<br/>{$vo['logintime']}</td>
                            <td>{$vo['created']}</td>
                        </tr>
                    </iterate>
                <else/>
                    <tr class="notfound">
                        <td colspan="20">{%no_record}</td>
                    </tr>
                </present>
            </tbody>
        </table>
    </form>
    <ul class="fnc">
        <li class="page">{$page}</li>
        <li><button type="button" class="btn" onclick="act('edit');">{%action_alter}</button></li>
        <li><button type="button" class="btn" onclick="act('removal');">{%action_removal}</button></li>
    </ul>
</div>
</div>
<include file="pAdmin:footer" />
